/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.cip.esymons.tesoreria.bc;

import java.util.logging.Level;
import java.util.logging.Logger;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;

/**
 *
 * @author Administrador
 */
public class EjecutarPagoDelegate {
    private EjecutarPagoLocal local;

    public EjecutarPagoDelegate() {
        local = lookupEjecutarPagoBean();

    }

    public RealizarPagoLocal getRealizarPago(){
        return local.getRealizarPago();
    }

    public void init(){
        local.init();
    }

    private EjecutarPagoLocal lookupEjecutarPagoBean() {
        try {
            Context c = new InitialContext();
            return (EjecutarPagoLocal) c.lookup("java:comp/env/EjecutarPagoBean");
        } catch (NamingException ne) {
            Logger.getLogger(getClass().getName()).log(Level.SEVERE, "exception caught", ne);
            throw new RuntimeException(ne);
        }
    }

    
    
}
